#extension :task_notification => :xmpp do
#  
#  xmpp_notify = lambda do |text|
#    require "xmpp4r/client"
#
#    #Jabber::debug = true
#    jid = Jabber::JID.new(fetch(:xmpp_jid))
#    
#    cl = Jabber::Client.new(jid)
#    cl.use_ssl = fetch(:xmpp_use_ssl, false)
#    cl.connect fetch(:xmpp_host, nil), fetch(:xmpp_port, 5222)
#    begin
#      cl.auth(fetch(:xmpp_password))
#      cl.send Jabber::Message.new(fetch(:xmpp_destination_jid), text).set_type(:normal).set_id("1")
#    ensure
#      cl.close
#    end
#  end
#  
#  task :notify_task_success do
#    execute_previous
#    xmpp_notify.call "[Wondercap] #{task_name} on #{configuration_name} on #{outer_configuration.area_name} area SUCCEEDED"
#  end
#  
#  task :notify_task_failure do
#    execute_previous
#    xmpp_notify.call "[Wondercap] #{task_name} on #{configuration_name} on #{outer_configuration.area_name} area FAILED (#{error})"
#  end
#  
#  task :notify_task_success_summary do
#    execute_previous
#    xmpp_notify.call "[Wondercap] #{task_name} on #{outer_configuration.names.join(",")} on #{outer_configuration.area_name} area totally SUCCEEDED"
#  end
#  
#  task :notify_task_failure_summary do
#    execute_previous
#    xmpp_notify.call "[Wondercap] #{task_name} on #{outer_configuration.names.join(",")} on #{outer_configuration.area_name} area FAILED:\n#{error.message}"
#  end
#  
#end
#
#extension :deployment_notification => :xmpp do
#  #TODO: implement
#end
#
#extension :notification => :xmpp do  
#  use :task_notification => :xmpp
#  use :deployment_notification => :xmpp
#end
#
#extension :notification => :gtalk do
#  use :notification => :xmpp do
#    set :xmpp_use_ssl, true
#    set :xmpp_host, "talk.google.com"
#    set :xmpp_port, 5223
#  end
#end
